<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	template="/layout/template.xhtml"
	xmlns:a4j="http://richfaces.org/a4j">
	<ui:define name="stylefms">
		<link href="/stylesheet/theme.css" rel="stylesheet" type="text/css" />
		<link href="/stylesheet/fms.css" rel="stylesheet" type="text/css" />
		<link href="/stylesheet/panel.css" rel="stylesheet" type="text/css" />
		<link href="/stylesheet/debug.css" rel="stylesheet" type="text/css" />
	</ui:define>
	<ui:define name="varProjectName">
		<ui:param name="projectName" value="#{appRes['mod.fms.com.maintenances.compras']}" />
	</ui:define>


	<ui:define name="body">
	

		<a4j:form id="saleMainGridForm" ajaxSingle="true">
			<rich:panel styleClass="form" style="height: 550px; position:relative;">
			<f:facet name="header"><h:outputText value="Transacciones" /></f:facet>
				<div class="button-container">
					<rich:panel styleClass="form" style="width:700px; height:100px; position:relative; margin-bottom:10px;">
						<f:facet name="header">Transacciones</f:facet>
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Venta de Animales"
							onclick="#{rich:component('modalSale')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Nota de Credito"
							onclick="#{rich:component('modalOrderConfirm')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Cobro de Cuotas"
							onclick="#{rich:component('modalOrderCancel')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
					</rich:panel>
					<rich:panel styleClass="form" style="width:700px; height:100px; position:relative; margin-bottom:10px;">
						<f:facet name="header">Consultas</f:facet>
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Consulta de Facturas"
							onclick="#{rich:component('modalSaleQuery')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Saldo de Clientes"
							onclick="#{rich:component('modalOrderQuery')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Cobros"
							onclick="#{rich:component('modalOrderQuery')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
						<div class="button-trn-cont" >
						<a4j:commandButton styleClass="button-trn" value="Stock de Animales"
							onclick="#{rich:component('modalOrderQuery')}.show()">
							<div class="button-trn-img"><h:graphicImage value="/img/icons/order.png"></h:graphicImage></div>
						</a4j:commandButton>
						</div>
						<rich:spacer width="10" />
					</rich:panel>
				</div>
			</rich:panel>	
		</a4j:form>
		
		
		<rich:modalPanel 
			id="modalSale"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Venta de Animales" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalSaleHide" />
					<rich:componentControl for="modalSale"
						attachTo="modalSaleHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalSaleEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/ven/transactions/venSale.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel  
			id="modalSaleQuery"  
			width="1024" 
			height="500" 
			resizeable="false" 
			autosized="false" 
			top="30">
			<f:facet name="header">
				<h:panelGroup>
					<h:outputText value="Consultar Pedidos" />
				</h:panelGroup>
			</f:facet>
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/close.png" style="cursor:pointer"
						id="modalSaleQueryHide" />
					<rich:componentControl for="modalSaleQuery"
						attachTo="modalSaleQueryHide" operation="hide" event="onclick" />
				</h:panelGroup>
			</f:facet>
			<h:panelGroup id="modalSaleQueryEdit">
			<!--  **** Include of the update page ****  -->
				<a4j:include viewId="/fms/ven/transactions/venSaleQuery.xhtml" />
			</h:panelGroup>
		</rich:modalPanel>
		
		<rich:modalPanel 
			id="wait-dialog" 
			resizeable="false" 
			autosized="false" 
			width="400" height="65" 
			moveable="false" 
			shadowOpacity="0"
			style="border:2px solid #6FADDF;-webkit-border-radius: 3px;-moz-border-radius: 3px;">
			<f:facet name="header">Un momento por favor..</f:facet>
			<h:graphicImage value="/img/ajax/ajax_load_04.gif" style="width:16px; float:left; padding-right:10px;"/>
			<h:outputText id="wait-dialog-process-text" value="Su peticion esta siendo procesada"/>
		</rich:modalPanel>

	</ui:define>

</ui:composition>